<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>盘古租车</title>
    <meta name="keywords" content="盘古租车" />
    <meta name="description" content="盘古租车" />
    <meta name="Author" content="024" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <script type="text/javascript" src="__JS__/urlredirect.js"></script>
    {load href="/static/css/style.css" /} {load href="/static/css/bootstrap.min.css" /}
    <LINK href="/static/css/jbox.css" rel=stylesheet>
    <script language="JavaScript" type="text/javascript" src="__JS__/jquery.js"></script>
    <script language="JavaScript" type="text/javascript" src="__JS__/functions.js"></script>
    <!-- <script language="JavaScript" type="text/javascript" src="__JS__/validForm/FormValid.js"></script> -->
    <script language="JavaScript" type="text/javascript" src="__JS__/jquery.jBox-2.3.min.js"></script>
    <script language="JavaScript" type="text/javascript" src="__JS__/search.js"></script>
    <script language="JavaScript" type="text/javascript" src="__JS__/menu.js"></script>
    <script language="JavaScript" type="text/javascript" src="__JS__/jQselect.js"></script>
    <script language="JavaScript" type="text/javascript" src="__JS__/slides.min.jquery.js"></script>
    <script language="JavaScript" type="text/javascript" src="__JS__/jquery.touchSlider.js"></script>
    <script language="JavaScript" type="text/javascript" src="__JS__/index.js"></script>
    <script type="text/javascript">
   

    $(document).ready(function() {
         //短信注册接口
            $('#SMS').click(function sms() {
                var phone=$('#phone').attr('value');
              
                $.ajax({
                    url: '/index/index/sms',
                    type: 'post',
                    dataType: 'json',
                    data: {'phone': phone},
                })
                .done(function(data) {
                    verifyCode=data.code;   
                })
                if (status==1) {
                    return false;
                }
                var i=120;

                var timer=setInterval(function () {
               
                i--;
                if (i==0) {
                    $('#SMS').html('重新发送');
                    clearInterval(timer);
                    status =0;


                }else{
                     
                    $('#SMS').html('已发送'+i);
                  

                    $('#SMS').css('disabled', 'disabled');
                    status=1;
                }
            },1000);
            });
           
        //设置登录页面弹出效果  

        $('.nav-login').click(function() {
            $('.login-form-mask:first').fadeIn(100);
            $('.login-form:first').slideDown(200);
        });
        $('.login-close').eq(0).click(function() {
            $('.warning').each(function() {
                $(this).text('');
            });
            $('.login-form-mask:first').fadeOut(100);
            $('.login-form:first').slideUp(200);
        });

        // 验证码刷新
        // 
        // 
        function captcha_fresh() {
            $('.captcha').each(function() {
                $(this).click(function() {
                    var a = $(this).children().attr('src');
                    // var a = $(this).childern().attr('src');
                    // alert(a);
                    $(this).children().attr('src', a + '?t=' + Math.random());
                    // alert($('.captcha').attr('src'));
                });
            });
        }

        captcha_fresh();
        // 退出操作
        $('#exit').click(function(){
            $('#exit_form').css('display','flex');
            $('#exit_form').slideDown(300);
            document.cookie = "user=; expires=-1";
            document.cookie = "uid=; expires=-1";
            setTimeout(function(){
                $('#exit_form').slideUp(200);
                window.location = '';
            },1000);
        });



        $(".main_visual").hover(function() {
            $("#btn_prev,#btn_next").fadeIn()
        }, function() {
            $("#btn_prev,#btn_next").fadeOut()
        })
        $dragBln = false;
        $(".main_image").touchSlider({
            flexible: true,
            speed: 200,
            btn_prev: $("#btn_prev"),
            btn_next: $("#btn_next"),
            paging: $(".flicking_con a"),
            counter: function(e) {
                $(".flicking_con a").removeClass("on").eq(e.current - 1).addClass("on");
            }
        });
        $(".main_image").bind("mousedown", function() {
            $dragBln = false;
        })
        $(".main_image").bind("dragstart", function() {
            $dragBln = true;
        })
        $(".main_image a").click(function() {
            if ($dragBln) {
                return false;
            }
        })
        timer = setInterval(function() { $("#btn_next").click(); }, 5000);
        $(".main_visual").hover(function() {
            clearInterval(timer);
        }, function() {
            timer = setInterval(function() { $("#btn_next").click(); }, 5000);
        })
        $(".main_image").bind("touchstart", function() {
            clearInterval(timer);
        }).bind("touchend", function() {
            timer = setInterval(function() { $("#btn_next").click(); }, 5000);
        })
    });
    </script>
    <script>

    $(function() {
        // Set starting slide to 1
        var startSlide = 1;
        // Get slide number if it exists
        if (window.location.hash) {
            startSlide = window.location.hash.replace('#', '');
        }
        // Initialize Slides
        $('#slides').slides({
            preload: true,
            preloadImage: 'img/loading.gif',
            generatePagination: true,
            play: 0,
            pause: 2500,
            hoverPause: true,
            // Get the starting slide
            start: startSlide,
            animationComplete: function(current) {
                // Set the slide number as a hash
                //window.location.hash = '#' + current;
            }
        });


        // 登录检验
        // 用户名
        $('.uname:first').blur(function() {
            if (!$(this).attr('value')) {
                $(this).parent().next().text("用户名不能为空");
            } else {
                $(this).parent().next().text('');
            }
        });
        // 密码验证



        $('.upwd:first').blur(function() {
            if (!$(this).attr('value')) {
                $(this).parent().next().text("密码不能为空");
            } else {
                $(this).parent().next().text('');
            }
        });
        // 验证码验证
        $('.captcha_input:first').blur(function() {
            if (!$(this).attr('value')) {
                $(this).parent().parent().next().find('.warning').text("验证码不能为空！");
            } else {
                $(this).parent().parent().next().find('.warning').text("");
            }
        });
        // 手机验证码验证
        $('#verify').blur(function() {
           if ($('#verify').attr('value')==verifyCode) {
            $('#yanzheng').html('验证成功');
           }else{
             $('#yanzheng').html('输入有误,重新输入');
           }
        });
        // 提示框函数
            function tips(content){
            
             $('#exit_form>h4').text(content); 
             $('#exit_form').fadeIn(100);
             setTimeout(function(){
               $('#exit_form').fadeOut(400);
             },1000);
            }

        $('#login').click(function() {
            // alert('asdf');
            var uname = $('.uname:first').attr('value');
            var upwd = $('.upwd:first').attr('value');
            var captcha = $('.captcha_input:first').attr('value');
            var checked = 'unchecked';
            if (!captcha) {
                $('.captcha_input:first').parent().parent().next().find('.warning').text("验证码不能为空！");
                return false;
            }
            if ($('#checkid').prop('checked')) {
                checked = 'checked';
            }
            // alert(uname+upwd);
            $.ajax({
                'type': 'post',
                'url': '/user/user/login_v',
                'data': { 'username': uname, 'password': upwd, 'captcha': captcha , 'checked':checked},
                'async': true,
                'success': success,
                'dataType': 'json'
            });
            
            function success(data) {
                // console.log(data);
                if (data.captcha == 'failed') {
                    tips('验证码有误，请重新输入');
                } else if (data.search == 'noUser') {
                    $('.captcha').each(function() {

                        var a = $(this).children().attr('src');
                        // var a = $(this).childern().attr('src');
                        // alert(a);
                        $(this).children().attr('src', a + '?t=' + Math.random());
                        // alert($('.captcha').attr('src'));

                    });
                    tips('用户名或者密码有误');
                } else {
                    tips('登陆成功');
                    setTimeout(function(){
                        window.location = 'index';
                    },1000);
                    
                }
            }


        });

        // loginend
    });
    </script>
    <!--[if IE 6]><script type="text/javascript" src="js/DD_belatedPNG.js"></script><![endif]-->
</head>

<body>
    <div class="fixed"> <a href="/message/index/index" title="留言" class="barbook"></a> <a href="javascript:;" title="二维码" class="codepic"></a> <a href="javascript:;" title="返回顶部" class="backup"></a>
        <div> <img src="http://0001543.ks.panguweb.cn/upfile/qr/qrcode.png" alt="这里是您的网站名称" class="code" /> </div>
    </div>
    <div class="head">
        <div class="headtop">
            <div class="fra1">
                <a href="/index" title="这里是您的网站名称"><img src="__IMG__/logo.png" alt="这里是您的网站名称" /></a>
                <div class="head-right">
                    <span><font>租车<br />热线 </font><label>+86-0000-96877</label></span>
                    <div class="search">
                        <form id="search" name="search" method="get" action="http://0001543.ks.panguweb.cn/search.php">
                            
                            <div class="select pngFix">
                                <select id="rid" style="display: none" name="rid">
                                    <option value="1" selected="selected">新闻资讯</option>
                                    <option value="2">车辆展示</option>
                                    <option value="4">主要车型</option>
                                    <option value="8">资质荣誉</option>
                                </select>
                            </div>
                          
                        </form>
                        <script type=text/javascript>
                        jQuery(document).ready(function() {
                            jQuery("#rid").selectbox();
                        });
                        </script>
                    </div>
                </div>
            </div>
        </div>
        <div class="nav">
            <ul>
               
                <li><a href="/order/index/car_list" title="开始选车">开始选车</a></li>
                <li><a href="/index/index/page" title="关于我们">关于我们</a></li>
                <li><a href="/index/index/car_list" title="车辆展示">车辆展示</a></li>
                <li><a href="/index/index/article_list" title="新闻资讯">新闻资讯</a></li>
                <li><a href="/index/index/location/" title="公司地址">公司地址</a></li>
                <li><a href="/index/index/rongyu_list" title="资质荣誉">资质荣誉</a></li>
                <li><a href="/index/index/zhaopin_list" title="人才招聘">人才招聘</a></li>
                {if session('?user')}
                    <li><a href="/user/user_admin/info" title="{:session('user')}">{:session('user')}</a></li>
                    <li ><a href="javascript:;" title="exit" id="exit">退出</a></li> 
                 
                {elseif cookie('?user')}
                <li><a href="/user/user_admin/info" title="{:cookie('user')}">{:cookie('user')}</a></li>
                <li ><a href="javascript:;" title="exit" id="exit">退出</a></li>
                {else /}
                <li id="signin" class="nav-login"><a href="javascript:;" title="登录">登录</a></li>
                <li class="nav-reg"><a href="/index/index/register" title="注册">注册</a></li>
                {/if}
                {if cookie('uid')==1}
                <li><a href="/admin" title="后台管理">后台管理</a></li>
                {else /}
                 <li><a href="/user/user_admin/order" title="订单列表">订单列表</a></li>
                 {/if}
            </ul>
        </div>
    </div>
    <div class="clear"></div>


{__CONTENT__}
{include file="Common/foot" /}
